forum

Home / DeveloperSection / Forums / Why am I getting server errors when I enable Authentication on static files?

Why am I getting server errors when I enable Authentication on static files?

Anonymous User 2096 04-Nov-2015
I am upgrading my site to IIS7, .NET 4.0 and Integrated Pipeline and am having some issues.

I have a sub application (virtual directory on a remote server) in my IIS install which contains static files, and I want it to be authenticated using WindowAuthentication where as the rest of my site will be using FormsAuthentication.

It has a web.config that looks like:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
    <authentication mode="Windows" />
    <authorization>
        <allow users="?" />
    </authorization>
</system.web>
I add the 2 authentication modules in the parent web.config and remove the default managedOnly precondition. Although, obviously because of the remove statement the directory is not under any authentication. However if I remove those lines, I get a generic server 500 error. Am I missing something else?

Updated on 04-Nov-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By